CC3 vehicle shadow files *.nsd / *.zsd file format
(NSD / ZSD files are stored in CC3's Shadows.zfx)
(Mac-Motorola-like byte format: all in Big Endian, like CC3's Terrain file)

header 20 bytes

'SPRI'	4 bytes	// header ID
0001h	4 bytes	// version, always 0001h
03E8h	2 bytes	// unknown, always 1000 (decimal)
0040h	2 bytes	// number of entries in file, always 64
0001h	2 bytes	// number of static animation sequences, always 1
0001h	2 bytes	// number of direction-based animation sequences, always 1
0040h	2 bytes	// length of longest sequence, always 64
03E9h	2 bytes	// unknown, always 1001 (decimal)

each sprite entry (compressed graphics)

short	2 bytes	// width in pixels
short	2 bytes	// height in pixels
short	2 bytes	// hotspot-X
short	2 bytes	// hotspot-Y
long	4 bytes	// number of data bytes to follow
(height * 2 bytes)	// offset-table: offset of each line from beginning of pixel data
pixel-datas

for CC2/CC3 only: if the line's offset value in the offset-table is coded as FFFFh, 
then the entire line is white and no pixels are stored in the pixel-datas for this line.

compression bytes used in pixel-datas:
00h followed by number of pixels: transparent pixel amount to come
FFh followed by number of pixels: colored pixel amount to come
followed by 2-byte pixel values per pixel
F5h followed by number of pixels: shadow pixel amount to come
EDh end of line byte

Appendix: exactly 148 bytes, describing the one and only static animation sequence (containing sprite #0) and describing the one and only dynamic animation sequence (containing all 64 sprites).



last revised: Dec. 21st, 2005, Mafi